
<div class="bjui-pageContent">
	<ul id="paramTab" class="nav nav-tabs">
		<li class="active"><a href="#paramMain" data-toggle="tab">参数信息</a></li>
		<li><a href="#paramVlaue" data-toggle="tab">参数值信息</a></li>
	</ul>

	<form class="form-horizontal" id="paramForm" role="form"
					data-toggle="validate" data-alertmsg="false"
					data-callback="dialogCallback" action="param/saveOrUpdate">
		<div id="paramContent" class="tab-content" height="90%">
		
			<div class="tab-pane fade in active" id="paramMain" >
				
						<input name="param.id" id="id" type="hidden" value="${param.id!}">
						<input name="isNew" id="isNew" type="hidden" value="false">
						<div class="form-group">
							<label class="col-sm-2 control-label" for="param.name">参数名称</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.name"
									data-rule="required" type="text" value="${param.name!}" />
							</div>
							<label class="col-sm-2 control-label" for="param.code">参数代码</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.code" type="text"
									value="${param.code!}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label" for="param.status">参数状态</label>
							<div class="col-sm-4">
								<select class="form-control"  name="param.status" data-width="178" data-toggle="selectpicker" >
								<option value="1" <!--:if(has(param.status)&&param.status=='1') print("selected");  -->>启用</option>
								<option value="0" <!--:if(has(param.status)&&param.status=='0') print("selected");  -->>停用</option>
								<option value="-1" <!--:if(has(param.status)&&param.status=='-1') print("selected");  -->>删除</option>
								</select>
							</div>
							<label class="col-sm-2 control-label" for="param.sort">排序号</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.sort" type="password"
									 />
							</div>
						</div>
                          <div class="form-group">
							<label class="col-sm-2 control-label" for="param.createUserName">创建人</label>
							<div class="col-sm-4">
								<input class="form-control" name=""param.createUserName"" type="text" />
							</div>
							<label class="col-sm-2 control-label" for="param.createTime">创建时间</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.createTime" type="text"
									 />
							</div>
						</div>
                        <div class="form-group">
							<label class="col-sm-2 control-label" for="param.modifyUserName">修改人</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.modifyUserName" type="text" />
							</div>
							<label class="col-sm-2 control-label" for="param.modifyTime">修改时间</label>
							<div class="col-sm-4">
								<input class="form-control" name="param.modifyTime" type="text"/>
							</div>
						</div>

				
			</div>
			<div class="tab-pane fade  " id="paramVlaue">
			
			        <table id="paramValueTable" class="table table-bordered table-hover table-striped " data-toggle="tabledit" data-callback="saveCallBack" data-initnum="0" data-action="paramValue/saveOrUpdate?paramId=${param.id!}" data-single-noindex="true">
			            <thead>
			                <tr data-idname="paramValue[#index#].id">
			                   <input type="hidden" name="paramValue[#index#].paramId"  value="${param.id!}"  size="10">
			                    <th title="序号" ><input type="text" name="" class="no" disabled style="border-left:0px;border-top:0px;border-right:0px;border-bottom:1px" value="1" size="2"></th>
			                    <th title="名称"><input type="text" name="paramValue[#index#].name" data-rule="required" value="" size="5"></th>
			                    <th title="代码"><input type="text" name="paramValue[#index#].code" data-rule="required" value="" size="5"></th>
			                    <th title="值"><input type="text" name="paramValue[#index#].value" data-rule="required" value="" size="5"></th>
			                    <th title="状态"><select name="paramValue[#index#].status" data-toggle="selectpicker" size="10" data-rule="required"><option value="1">  启用</option><option value="0">  停用</option><option value="-1">  删除</option></select></th>
			                    <th title="排序号"><input type="text" name="paramValue[#index#].sort"  data-rule="required"  size="10"></th>
			                    <th title="" data-addtool="true" width="100">
			                     <a  class="btn btn-green" data-toggle="dosave">保存</a>
			                        <a href="paramValue/delete?id=${paramValue.id!}" class="btn btn-red row-del" data-confirm-msg="确定要删除该行信息吗？">删</a>
			                    </th>
			                </tr>
			            </thead>
			            
			            <!--:for(paramValue in paramValueList){ -->
			                 <tr data-id="${paramValue.id}">
			                    <td>${paramValueLP.index}</td>
			                    <td>${paramValue.name}</td>
			                    <td>${paramValue.code}</td>
			                    <td>${paramValue.value}</td>
			                    <td data-val="${paramValue.status}"></td>
			                    <td>${paramValue.sort}</td>
			                  
			                    <td data-noedit="true">
			                        <a type="button" class="btn btn-green" data-toggle="doedit">编辑</a>
			                        <a href="paramValue/delete?id=${paramValue.id!}" class="btn btn-red row-del" data-confirm-msg="确定要删除该行信息吗？">删</a>
			                    </td>
			                </tr>

			<!--:} -->
			            
			              
			                  
			        </table>
			</div>
			
		</div>
		</form>
</div>

	<div class="bjui-pageFooter">
		<ul>
			<li><button type="button" class="btn-close">关闭</button></li>
			<li><button type="submit" class="btn-default">全部保存</button></li>
		</ul>
	</div>
	<script>
		function save() {
			$("#paramForm").bjuiajax('ajaxForm', {
				callback : dialogCallback
			})

		}
		function saveCallBack(json){
			//console.log(this);
			if(json.statusCode == BJUI.statusCode.ok&&$('#id').val()==''){
				$('#id').val(json.paramId);
				$('#isNew').val(true);
				$('#paramValueTable').data('action','/paramValue/saveOrUpdate?id='+json.paramId);
			}
			 // $(this).tools._doRead(this)
			//$.find('[data-toggle="dosave"]').trigger(' click.bjui.tabledit.readonly')
		}
	</script>